#include<bits/stdc++.h>
using namespace std;
const int N=2e5+10;
int a[N],n;
bool vis1[N],vis2[N];
int erfen(int x){
	int l=1,r=n;
	while(l<r){
		int mid=l+(r-l)/2;
		//cout<<mid<<' '<<vis1[mid]<<'\n';
		if(a[mid]<=x||vis1[mid]==1)l=mid+1;
		else r=mid;
	}
	return l;
}
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+n+1);
    for(int i=1;i<=n;i++){
        vis1[i]=0;
        vis2[i]=0;
    }
    for(int i=1;i<=n;i++){
        int x=erfen(a[i]);
        if(x>n)break;
        //cout<<x<<'\n';
        if(x>i&&x<=n&&a[x]>a[i]&&vis1[x]==0){
            vis1[x]=1;//gongji
            vis2[i]=1;//taotai
        }
    }
    /*for(int i=1;i<=n;i++){
        cout<<vis1[i]<<' ';
    }
    cout<<'\n';*/
    int ans=0;
    for(int i=1;i<=n;i++){
        if(vis2[i]==0)ans++;
    }
    cout<<ans<<'\n';
    return 0;
}
